image compression with python